package com.test;


import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
import java.util.Vector;

public class Main02
{
    public static void main(String[] args)
    {
        Vector<Object> v = new Vector<>();
        for (int i = 0; i < 5; i++)
        {
            Object o = new Object();
            v.add(o);
//            o = null;
        }
//        System.out.println(v.get(0));
//        System.out.println(v.get(1));
//        System.out.println(v.get(2));
        System.out.println(v.get(3));
        System.out.println(v.get(4));
        List<User01> list = new ArrayList<>();
        list.add(new User01());
        list.add(new User01());
        list.add(new User01());
        System.out.println(list);
        ArrayList<User01> list2 = new ArrayList<>();
        list2.add(new User01());
        list.addAll(list2);
        System.out.println(list);
        System.out.println(list2);
//        System.out.println(list.get(0));
//        System.out.println(list.get(1));
//        System.out.println(list.get(2));
        Stack<Integer> s = new Stack<>();
        s.push(4);
        s.push(5);
        s.push(6);
        Integer peek1 = s.peek();
        Integer peek2 = s.peek();
        System.out.println(peek1);
        System.out.println(peek2);
        int search = s.search(6);
        System.out.println(search);
    }
}
class User01{
    private int age;
    private String name;
}
